<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>

<c:set var="context"
	value="${pageContext.request.servletContext.contextPath}" />
<tiles:importAttribute name="type" />
<tiles:importAttribute name="change" />
<tiles:importAttribute name="url" />

<div class="area"></div>
<nav class="main-menu">
	<c:choose>
		<c:when test="${type == 1}">
			<ul>
				<li><a href="${context}/portal"><i class="fa fa-home fa-2x"></i><span
						class="nav-text">Home</span> </a></li>
				<li><a href="${context}/portal/user/list"><i
						class="fa fa-users fa-2x"></i><span class="nav-text">Users</span>
				</a></li>
				<li><a href="${context}/portal/subject/list"><i
						class="fa fa-book fa-2x"></i><span class="nav-text">Subjects</span>
				</a></li>
				<li><a href="${context}/portal/course/list"><i
						class="fa fa-graduation-cap  fa-2x"></i><span class="nav-text">Courses</span></a></li>
			</ul>
			<ul class="logout">
				<li><a href="${context}/portal/account/edit"><i
						class="fa fa-user fa-2x"></i><span class="nav-text">Account</span>
				</a></li>
				<li><a href="${context}/portal/account/changepassword"><i
						class="fa fa-refresh fa-2x"></i><span class="nav-text">Change
							password</span> </a></li>
				<li><a href="${context}/logout"> <i
						class="fa fa-power-off fa-2x"></i> <span class="nav-text">
							Logout </span>
				</a></li>
			</ul>
		</c:when>
		<c:when test="${type == 2}">
			<c:if test="${change == 0}">
				<ul>
					<li><a href="${context}/lecturer/"><i
							class="fa fa-home fa-2x"></i><span class="nav-text">Home</span> </a></li>
				</ul>
				<ul class="logout">
					<li><a href="${context}/lecturer/account/edit"><i
							class="fa fa-user fa-2x"></i><span class="nav-text">Account</span>
					</a></li>
					<li><a href="${context}/lecturer/account/changepassword"><i
							class="fa fa-refresh fa-2x"></i><span class="nav-text">Change
								password</span> </a></li>
					<li><a href="${context}/logout"> <i
							class="fa fa-power-off fa-2x"></i> <span class="nav-text">
								Logout </span>
					</a></li>
				</ul>
			</c:if>
			<c:if test="${change == 1}">
				<li><a
					href="${context}/lecturer/${url[5]}/${url[6]}/${url[7]}/test/"><i
						class="fa fa-check-square-o fa-2x"></i><span class="nav-text">Tests
							& Quizzes</span> </a></li>
				<li><a
					href="${context}/lecturer/${url[5]}/${url[6]}/${url[7]}/pool/">
						<i class="fa fa-database fa-2x"></i> <span class="nav-text">
							Question Pool </span>
				</a></li>
				<li><a
					href="${context}/lecturer/${url[5]}/${url[6]}/${url[7]}/assignment/">
						<i class="fa fa-file-text-o fa-2x"></i> <span class="nav-text">
							Assignments </span>
				</a></li>
			</c:if>
		</c:when>
		<c:otherwise>
			<c:if test="${change == 0}">
				<ul>
					<li><a href="${context}/student/"><i
							class="fa fa-home fa-2x"></i><span class="nav-text">Home</span> </a></li>
				</ul>
				<ul class="logout">
					<li><a href="${context}/student/account/edit"><i
							class="fa fa-user fa-2x"></i><span class="nav-text">Account</span>
					</a></li>
					<li><a href="${context}/student/account/changepassword"><i
							class="fa fa-refresh fa-2x"></i><span class="nav-text">Change
								password</span> </a></li>
					<li><a href="${context}/logout"> <i
							class="fa fa-power-off fa-2x"></i> <span class="nav-text">
								Logout </span>
					</a></li>
				</ul>
			</c:if>
			<c:if test="${change == 1}">
				<li><a
					href="${context}/student/${url[5]}/${url[6]}/${url[7]}/test/"><i
						class="fa fa-check-square-o fa-2x"></i><span class="nav-text">Tests
							& Quizzes</span> </a></li>
				<li><a
					href="${context}/student/${url[5]}/${url[6]}/${url[7]}/assignment/"><i
						class="fa fa-file-text-o fa-2x"></i><span class="nav-text">Assignment</span>
				</a></li>
			</c:if>
		</c:otherwise>
	</c:choose>
</nav>